/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.front.entity;

import com.thinkgem.jeesite.modules.front.entity.FrontUser;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 测试详细记录Entity
 * @author 朱俊吉
 * @version 2017-11-30
 */
public class TestRecord extends DataEntity<TestRecord> {
	
	private static final long serialVersionUID = 1L;
	private FrontUser frontUser;		// 用户
	private MyTheme theme;			// 题目
	private String squence;				// 序号
	private String answer;				// 题目的答案
	private String score;				// 用户的回答
	private Date testDate;				// 测试时间
	private String testType;			// 测试类型
	
	public TestRecord() {
		super();
	}

	public TestRecord(String id){
		super(id);
	}

	public FrontUser getFrontUser() {
		return frontUser;
	}

	public void setFrontUser(FrontUser frontUser) {
		this.frontUser = frontUser;
	}
	
	public MyTheme getTheme() {
		return theme;
	}

	public void setTheme(MyTheme theme) {
		this.theme = theme;
	}

	public String getSquence() {
		return squence;
	}

	public void setSquence(String squence) {
		this.squence = squence;
	}
	
	@Length(min=0, max=10, message="题目的答案必须介于 0 和 10 之间")
	public String getAnswer() {
		return answer;
	}

	public void setAnswer(String answer) {
		this.answer = answer;
	}
	
	@Length(min=0, max=255, message="用户的回答必须介于 0 和 255 之间")
	public String getScore() {
		return score;
	}

	public void setScore(String score) {
		this.score = score;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getTestDate() {
		return testDate;
	}

	public void setTestDate(Date testDate) {
		this.testDate = testDate;
	}
	
	@Length(min=0, max=1, message="测试类型长度必须介于 0 和 1 之间")
	public String getTestType() {
		return testType;
	}

	public void setTestType(String testType) {
		this.testType = testType;
	}
	
}